package GUILag;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import com.jgoodies.forms.factories.DefaultComponentFactory;
import java.awt.Font;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.JToolBar;
import javax.swing.JTextArea;
import java.awt.Color;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import javax.swing.JList;
import javax.swing.border.TitledBorder;
import java.awt.TextArea;
import java.awt.Scrollbar;

public class FindProduktGUI extends JFrame {

	private JPanel contentPane;
	private JTextField txtSgEfterProdukt;
	private JTextField txtAntal;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FindProduktGUI frame = new FindProduktGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public FindProduktGUI() {
		setTitle("Find produkt");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 657, 422);
		contentPane = new JPanel();
		contentPane.setBackground(Color.LIGHT_GRAY);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JTree tree = new JTree();
		tree.setModel(new DefaultTreeModel(
			new DefaultMutableTreeNode("Vestbjerg byggecenter A/S") {
				{
					add(new DefaultMutableTreeNode("Kassesalg"));
					add(new DefaultMutableTreeNode("Ordre"));
					add(new DefaultMutableTreeNode("Opret nyt medlem"));
					add(new DefaultMutableTreeNode("S\u00F8g efter medlem"));
				}
			}
		));
		tree.setBounds(0, 0, 153, 384);
		contentPane.add(tree);
		
		JTextArea txtrOrdreId = new JTextArea();
		txtrOrdreId.setText("Ordre ID: ");
		txtrOrdreId.setBounds(396, 21, 136, 22);
		contentPane.add(txtrOrdreId);
		
		JTextArea txtrDato = new JTextArea();
		txtrDato.setText("Dato: ");
		txtrDato.setBounds(542, 21, 89, 22);
		contentPane.add(txtrDato);
		
		txtSgEfterProdukt = new JTextField();
		txtSgEfterProdukt.setHorizontalAlignment(SwingConstants.CENTER);
		txtSgEfterProdukt.setText("S\u00F8g efter produkt ID");
		txtSgEfterProdukt.setBounds(163, 63, 296, 22);
		contentPane.add(txtSgEfterProdukt);
		txtSgEfterProdukt.setColumns(10);
		
		txtAntal = new JTextField();
		txtAntal.setHorizontalAlignment(SwingConstants.CENTER);
		txtAntal.setText("Antal");
		txtAntal.setBounds(469, 63, 63, 22);
		contentPane.add(txtAntal);
		txtAntal.setColumns(10);
		
		JButton btnNewButton = new JButton("Tilf\u00F8j");
		btnNewButton.setBounds(542, 63, 89, 23);
		contentPane.add(btnNewButton);
		
		JList list = new JList();
		list.setBorder(new TitledBorder(null, "Produktliste", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		list.setBounds(163, 96, 468, 203);
		contentPane.add(list);
		
		JTextArea txtrTotal = new JTextArea();
		txtrTotal.setText("Total = ");
		txtrTotal.setBounds(163, 310, 231, 22);
		contentPane.add(txtrTotal);
		
		JTextArea txtrTotalMedRabat = new JTextArea();
		txtrTotalMedRabat.setText("Total med rabat = ");
		txtrTotalMedRabat.setBounds(404, 310, 227, 22);
		contentPane.add(txtrTotalMedRabat);
		
		JButton btnTilbage = new JButton("Tilbage");
		btnTilbage.setBounds(163, 350, 89, 23);
		contentPane.add(btnTilbage);
		
		JButton btnNste = new JButton("N\u00E6ste");
		btnNste.setBounds(542, 350, 89, 23);
		contentPane.add(btnNste);
		
		Scrollbar scrollbar = new Scrollbar();
		scrollbar.setBounds(614, 96, 17, 203);
		contentPane.add(scrollbar);
	}
}
